import { IsString, IsInt, IsNotEmpty, MinLength, MaxLength, IsOptional, IsUUID } from 'class-validator'

export class CreateUserDto {
  @IsString()
  @IsNotEmpty()
  @MinLength(4)
  @MaxLength(16)
  username: string

  @IsString()
  @IsNotEmpty()
  @MaxLength(255)
  password: string

  @IsInt()
  @IsNotEmpty()
  role_id: number

  @IsInt()
  @IsNotEmpty()
  state: number

  @IsOptional()
  @IsUUID()
  _id?: string
}
